export default function createUniqueId(prefix?: string, len = 12) {
  const getRandom = (s: number, e: number) =>
    Math.floor(Math.random() * (e - s + 1)) + s;
  let id = prefix ? `${prefix}-` : '';
  for (let i = 0; i < len; i++) {
    id += String.fromCharCode(getRandom(65, 90));
  }
  return id;
}
